package cn.monkey.family.server.domain.uc.user;

import cn.monkey.family.data.Result;
import cn.monkey.family.data.context.RequestContext;
import cn.monkey.family.data.crud.CrudService;
import cn.monkey.family.data.uc.user.UserDto;
import cn.monkey.family.data.uc.user.UserQueryRequest;
import cn.monkey.family.data.uc.user.UserVo;
import cn.monkey.family.data.uc.user.role.UserRoleBindRequest;
import cn.monkey.family.data.uc.user.role.UserRoleVo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

public interface IUserService extends CrudService<String, UserQueryRequest, UserDto, UserVo> {

    Result<UserRoleVo> readUserRole(RequestContext requestContext, String id);

    Result<UserRoleVo> bindUserRole(RequestContext requestContext,
                                    String uid,
                                    UserRoleBindRequest userRoleBindRequest);

    Result<Page<UserRoleVo>> readUserRole(RequestContext requestContext, UserQueryRequest request, Pageable pageable);
}
